GBML manual / Cutscenes

cutscene_skip

Ends the running scene at once, if it was authored skippable (a harmless no-op otherwise, or if none is running) - the same cleanup path a scene reaching its own natural end already uses.

Syntax

cutscene_skip()

Returns

Nothing.

Description

Ends the running scene at once, if it was authored skippable (a harmless no-op otherwise, or if none is running) - the same cleanup path a scene reaching its own natural end already uses.

Usually nothing to call at all

A skippable scene is already skipped automatically: the engine polls the skip button directly, every frame a scene plays - it has to, since the ordinary Button-event dispatch a project might otherwise bind a skip control to is exactly what a running scene freezes. Most projects never call this function at all; it exists for the cases that still need it - skipping from somewhere Draw-family (never frozen, so it can react to something a frozen Step event cannot), or a project with its own reason to trigger a skip outside the fixed button.

Whether skipping is even allowed is decided once, per scene, when it is authored - not by the caller. Calling this on a scene that was not marked skippable does nothing, exactly like calling it when nothing is playing at all.

Example

cutscene_skip();

Ends whatever scene is currently playing, immediately, if it allows being skipped - a harmless no-op in every other case, so it is always safe to call without checking cutscene_active() first.

On the GBA

A skippable scene is ALSO skipped automatically by the player pressing START - the engine polls that directly every frame a scene plays (it has to: the ordinary Button-event dispatch a project might otherwise bind a skip control to is exactly what a running scene freezes). This function exists for the cases that still need it: skipping from somewhere Draw-family (never frozen), or from a project with its own reasons to trigger a skip outside that fixed button.

See also: cutscene_stopcutscene_activecutscene_start